package main.parser;

import java.util.ArrayList;
import java.util.List;
import main.parser.LineParser;
import main.flow.Flow;
import main.flow.Data;

public class Parser 
{
	private List<Flow> flows = new ArrayList<Flow>();
	
	public void parse(String line)
	{
		LineParser lp = new LineParser(flows);
		lp.parse(line);
	}
	
	public void print()
	{
		String name;
		
		for (Flow flow : flows)
		{
			System.out.println(flow.getId());
			name = flow.getName();
			
			for (Data value : flow.values)
			{
				System.out.println("\t" + value.time + ": " + name + " = " + value.value);
			}
		}
	}
}
